-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start annotating project-system for nullability. #4404
Conversation
...Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/AbstractMultiLifetimeComponent.cs
Outdated
Show resolved
Hide resolved
Why aren't we saying this returns |
...Studio.ProjectSystem.Managed/ProjectSystem/AppDesignerFolderProjectTreePropertiesProvider.cs
Outdated
Show resolved
Hide resolved
...Studio.ProjectSystem.Managed/ProjectSystem/AppDesignerFolderProjectTreePropertiesProvider.cs
Outdated
Show resolved
Hide resolved
...o.ProjectSystem.Managed/ProjectSystem/Build/ImplicitlyActiveConfiguredProjectReadyToBuild.cs
Outdated
Show resolved
Hide resolved
...ualStudio.ProjectSystem.Managed/ProjectSystem/ConfiguredProjectImplicitActivationTracking.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DataFlowUtilities.cs
Show resolved
Hide resolved
src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Debug/LaunchSettingsData.cs
Show resolved
Hide resolved
...o.ProjectSystem.Managed/ProjectSystem/LanguageServices/UnconfiguredProjectContextProvider.cs
Outdated
Show resolved
Hide resolved
...io.ProjectSystem.Managed/ProjectSystem/Logging/ProjectLoggerExtensions.ProjectLoggerBatch.cs
Show resolved
Hide resolved
{ | ||
if (_attributeValueProviderMap.TryGetValue(propertyName, out SourceAssemblyAttributePropertyValueProvider provider) && | ||
!await IsAssemblyInfoPropertyGeneratedByBuild(propertyName)) | ||
{ | ||
#pragma warning disable CS8604 | ||
await provider.SetPropertyValueAsync(unevaluatedPropertyValue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review - not sure if we should be allowing nulls here, and if not, what we should do? Throw/skip the call/etc?
@@ -384,7 +387,7 @@ private IEnumerable<string> CollectInputs(BuildUpToDateCheckLogger logger) | |||
if (_customInputs.Count != 0) | |||
{ | |||
logger.Verbose("Adding " + UpToDateCheckInput.SchemaName + " inputs:"); | |||
foreach (string input in _customInputs.Select(_configuredProject.UnconfiguredProject.MakeRooted)) | |||
foreach (string input in _customInputs.Select(s => _configuredProject.UnconfiguredProject.MakeRooted(s))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like another compiler bug, but I wasn't sure how to file it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually gives better performance anyway as the compiler caches the delegate for lambdas but not for method groups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that changed very recently, but I could be wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I can't reproduce the old behaviour any more, even on 7.3:
src/Microsoft.VisualStudio.ProjectSystem.Managed/Text/LazyStringSplit.cs
Show resolved
Hide resolved
src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Debug/WritableLaunchSettings.cs
Outdated
Show resolved
Hide resolved
@@ -147,15 +147,19 @@ private void ProcessProjectBuildFailure(IProjectRuleSnapshot snapshot) | |||
// | |||
// We still forward those 'removes' of references, sources, etc onto Roslyn to avoid duplicate/incorrect results when the next | |||
// successful build occurs, because it will be diff between it and this failed build. | |||
_context.LastDesignTimeBuildSucceeded = snapshot.IsEvaluationSucceeded(); | |||
if (_context != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume all this is rewritten in @davkean 's language service branch. But it feels like we would want to throw something in this case
src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/UpToDate/BuildUpToDateCheck.cs
Outdated
Show resolved
Hide resolved
...crosoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/PropertyPages/PropertyPage.cs
Outdated
Show resolved
Hide resolved
Remaining warnings are all from auto-generated files in the obj directory. Is there no way to turn this analysis off for generated code? Will we need to put |
@@ -390,8 +390,11 @@ private VersionCompatibilityData GetVersionCompatibilityData() | |||
|
|||
if (versionCompatData != null) | |||
{ | |||
// This is never null after InitializeAsync (which is called during package load) | |||
Version ourVSVersion = _ourVSVersion!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we want to throw an object disposed exception in this case?
...jectSystem.Managed.VS/ProjectSystem/VS/Input/Commands/AbstractGenerateNuGetPackageCommand.cs
Show resolved
Hide resolved
...dio.ProjectSystem.Managed.VS/ProjectSystem/VS/PropertyPages/WpfBasedPropertyPage.Designer.cs
Show resolved
Hide resolved
...ualStudio.ProjectSystem.Managed/ProjectSystem/ConfiguredProjectImplicitActivationTracking.cs
Outdated
Show resolved
Hide resolved
Refers to: src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/UnconfiguredProjectTasksService.cs:21 in 1c5b339. [](commit_id = 1c5b339, deletion_comment = False) |
src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Debug/LaunchSettingsProvider.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Debug/LaunchSettingsProvider.cs
Outdated
Show resolved
Hide resolved
8f281b1
to
86fe7ed
Compare
@Pilchie How do you want to move this forward? |
I think this is the wrong approach. Instead I think we should opt-in to C# 8, but leave nullable off, and let people do PRs a file/directory at a time using |
👍 Yeah I was thinking as much. |
e7bb224 annotates everything except the generated code for Microsoft.VisualStudio.ProjectSystem.Managed.dll